package com.gong.DesignPattern.builder.traditionBuilder;

/**
 * @author GongChang
 * @version 1.0
 * @date 2021/6/10 0010 9:52
 */
public class XiaomiBuilder implements ComputerBuilder {

    private Computer computer = new Computer();

    public XiaomiBuilder(){
        setCpu();
        setRam();
    }

    @Override
    public void setCpu() {
        computer.setCpu("小米cpu");
    }

    @Override
    public void setRam() {
        computer.setRam("小米ram");
    }

    @Override
    public void setUsb() {
        computer.setUsb("小米usb");
    }

    @Override
    public void setRom() {
        computer.setRom("小米rom");
    }

    @Override
    public void setKeyboard() {
        computer.setKeyboard("小米键盘");
    }

    @Override
    public Computer build() {
        return computer;
    }
}
